package cn.ruituo.adv.test;

import java.util.Scanner;

public class Judge {
    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < 100000; i++) {
            sb.append(i);
        }
        long end = System.currentTimeMillis();
        System.out.println(end - start);


        long start2 = System.currentTimeMillis();
        StringBuffer sb2 = new StringBuffer();
        for (int i = 0; i < 100000; i++) {
            sb.append(i);
        }
        long end2 = System.currentTimeMillis();
        System.out.println(end2 - start2);

//        System.out.print("输入作业名：");
//        Scanner sc = new Scanner(System.in);
//        String s = sc.next();
//        int index2 = s.lastIndexOf(".");
//        String s1 = s.substring(0, index2);
//        if (s1.matches("[\u4e00-\u9fa5]+") && index2 > 0 &&
//                (s.endsWith(".zip") || s.endsWith(".rar"))) {
//            System.out.println("作业名格式正确");
//        } else {
//            System.out.println("作业名格式不正确");
//        }
    }
}
